package com.ruoyi.project.mapper;

import java.util.LinkedHashMap;
import java.util.List;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.contract.domain.ContractInfo;
import com.ruoyi.project.domain.CompomentInfo;
import com.ruoyi.project.domain.ProjectModelInfo;
import com.ruoyi.project.vo.ExportCompomentInfo;
import com.ruoyi.project.vo.FloorCompomentInfo;
import com.ruoyi.project.vo.FloorInfo;
import org.apache.ibatis.annotations.Param;

/**
 * 项目建模Mapper接口
 * 
 * @author ruoyi
 * @date 2022-08-26
 */
public interface ProjectModelInfoMapper 
{
    /**
     * 查询项目建模
     * 
     * @param id 项目建模主键
     * @return 项目建模
     */
    public ProjectModelInfo selectProjectModelInfoById(Long id);

    /**
     * 查询项目建模列表
     * 
     * @param projectModelInfo 项目建模
     * @return 项目建模集合
     */
    public List<ProjectModelInfo> selectProjectModelInfoList(ProjectModelInfo projectModelInfo);

    /**
     * 新增项目建模
     * 
     * @param projectModelInfo 项目建模
     * @return 结果
     */
    public int insertProjectModelInfo(ProjectModelInfo projectModelInfo);

    /**
     * 修改项目建模
     * 
     * @param projectModelInfo 项目建模
     * @return 结果
     */
    public int updateProjectModelInfo(ProjectModelInfo projectModelInfo);

    /**
     * 删除项目建模
     * 
     * @param id 项目建模主键
     * @return 结果
     */
    public int deleteProjectModelInfoById(Long id);

    /**
     * 批量删除项目建模
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteProjectModelInfoByIds(Long[] ids);

    //删除楼栋
    public int deleteProjectModelInfoByFloorInfo(FloorInfo floorInfo);


    /**
     * 复制楼栋
     * @param floorInfo
     * @return
     */
    public int copyFloor(FloorInfo floorInfo);
    public int copyLayer(FloorInfo floorInfo);

    //获取楼层构件——楼层表
    public List<FloorCompomentInfo> getFloorLayer(FloorInfo floorInfo);
    public List<String> getFloorNum(FloorInfo floorInfo);
    public List<String> getCompomentNum(FloorInfo floorInfo);
    public LinkedHashMap<String,String> getCompomentTypeList(FloorInfo floorInfo);

    public List<CompomentInfo> getCompomentList(FloorInfo floorInfo);




    /**
     * 删除楼层
     * @return
     */
    public int delFloor(FloorInfo floorInfo);

    /**
     * 删除层
     * @param floorInfo
     * @return
     */
    public int delLayer(FloorInfo floorInfo);

    /**
     * 添加构件
     * @return
     */
    int batchInsert(@Param("list") List<ProjectModelInfo> list);

    int batchCompomentInsert(@Param("list") List<CompomentInfo> list);

    public List<ExportCompomentInfo> getExportCompomentInfo(@Param("projectNo") String projectNo,@Param("buildNo") String buildNo);

    public List<ContractInfo> getContractInfoList();

}
